package acm.蓝桥5;

import java.util.Arrays;
import java.util.Scanner;

public class 水题 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[] arr = new int[n+m+1];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = sc.nextInt();
        }
        Arrays.sort(arr);
        long diff=0;
        for (int i = 0; i < m; i++) {
            diff+=arr[i];
        }
        long sum=0;
        for (int i = arr.length - 1; i >= arr.length-n-1; i--) {
            sum+=arr[i];
        }
        System.out.println(sum-diff);
    }
}
